package com.ztman.service.work.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ztman.basic.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import static com.ztman.basic.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 *
 * </p>
 *
 * @author wsd
 * @since 2021-08-23
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("p_work_order_circulation_history")
@ApiModel(value = "WorkOrderCirculationHistory", description = "")
@AllArgsConstructor
public class WorkOrderCirculationHistory extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "")
    @Length(max = 128, message = "长度不能超过128")
    @TableField(value = "title", condition = LIKE)
    @Excel(name = "")
    private String title;

    @ApiModelProperty(value = "")
    @TableField("work_order")
    @Excel(name = "")
    private Long workOrder;

    @ApiModelProperty(value = "")
    @Length(max = 128, message = "长度不能超过128")
    @TableField(value = "state", condition = LIKE)
    @Excel(name = "")
    private String state;

    @ApiModelProperty(value = "")
    @Length(max = 128, message = "长度不能超过128")
    @TableField(value = "source", condition = LIKE)
    @Excel(name = "")
    private String source;

    @ApiModelProperty(value = "")
    @Length(max = 128, message = "长度不能超过128")
    @TableField(value = "target", condition = LIKE)
    @Excel(name = "")
    private String target;

    @ApiModelProperty(value = "")
    @Length(max = 128, message = "长度不能超过128")
    @TableField(value = "circulation", condition = LIKE)
    @Excel(name = "")
    private String circulation;

    @ApiModelProperty(value = "")
    @Length(max = 45, message = "长度不能超过45")
    @TableField(value = "processor", condition = LIKE)
    @Excel(name = "")
    private String processor;

    @ApiModelProperty(value = "")
    @TableField("processor_id")
    @Excel(name = "")
    private Long processorId;

    @ApiModelProperty(value = "")
    @Length(max = 128, message = "长度不能超过128")
    @TableField(value = "cost_duration", condition = LIKE)
    @Excel(name = "")
    private String costDuration;

    @ApiModelProperty(value = "")

    @TableField("remarks")
    @Excel(name = "")
    private String remarks;

    @ApiModelProperty(value = "")
    @TableField("status")
    @Excel(name = "")
    private Integer status;

    /**
     * 删除状态
     */
    @ApiModelProperty(value = "删除状态")
    @TableField("del_flag")
    @Excel(name = "删除状态", replace = {"是_true", "否_false", "_null"})
    private Boolean delFlag;
    @Builder
    public WorkOrderCirculationHistory(Long id, LocalDateTime createTime, Long createdBy, LocalDateTime updateTime, Long updatedBy,
                    String title, Long workOrder, String state, String source, String target,
                    String circulation, String processor, Long processorId, String costDuration, String remarks, Integer status,Boolean delFlag) {
        this.id = id;
        this.createTime = createTime;
        this.createdBy = createdBy;
        this.updateTime = updateTime;
        this.updatedBy = updatedBy;
        this.title = title;
        this.workOrder = workOrder;
        this.state = state;
        this.source = source;
        this.target = target;
        this.circulation = circulation;
        this.processor = processor;
        this.processorId = processorId;
        this.costDuration = costDuration;
        this.remarks = remarks;
        this.status = status;
        this.delFlag = delFlag;
    }

}
